package bookings;


public class CartItem {
    
    private String id;
    private String campDate;
    private String name; 
    private String campsize;
    private int nprice;
    private String discounts;
    private String holiday;
    private int price;
    private int subTotal;
    
   
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    
    public int getPrice() {
        return price;
    }
    public void setPrice(int price) {
        this.price = price;
        this.subTotal=this.price;
    }
    
    public int getSubTotal() {
        return subTotal;
    }
    
    public String getHoliday() {
        return holiday;
    }

    public void setHoliday(String holiday) {
        this.holiday = holiday;
    }

    @Override
    public boolean equals(Object o) {
        boolean ans = false;
        if(o instanceof CartItem)
        {
            CartItem cc=(CartItem)o;
            if(cc.id.equals(this.id) && cc.campDate.equals(this.campDate))
                ans=true;
        }
        return ans;        
    }

    @Override
    public int hashCode() {
        return (this.id + this.campDate).hashCode();
    }

    public String getCampDate() {
        return campDate;
    }

    public void setCampDate(String campDate) {
        this.campDate = campDate;
    }

    public String getDiscounts() {
        return discounts;
    }

    public void setDiscounts(String discounts) {
        this.discounts = discounts;
    }

    public String getCampsize() {
        return campsize;
    }

    public void setCampsize(String campsize) {
        this.campsize = campsize;
    }

    public int getNprice() {
        return nprice;
    }

   
    public void setNprice(int nprice) {
        this.nprice = nprice;
    }


    
    
    
    
}
